package tenumn.energytech.registrys;

import io.github.uicdb.liba.api.register.FluidHolder;
import net.minecraft.sounds.SoundEvents;
import software.bernie.geckolib3.core.util.Color;
import tenumn.energytech.EnergyTech;


public class FluidRegistry {
    //color得用rgba格式int
    public static FluidHolder petroleum = EnergyTech.LAZY_REGISTRY.fluid("petroleum")
            .attribute(builder -> builder.sound(SoundEvents.LAVA_EXTINGUISH).color(rgb(255, 255, 51)).viscosity(100).temperature(60))
            .name("zh_cn", "石油")
            .flowName("zh_cn", "流动的石油")
            .useWaterTexture()//不写这个默认采用流体同名材质
            .build();
    public static FluidHolder steam = EnergyTech.LAZY_REGISTRY.fluid("steam")
            .gas()
            .name("zh_cn", "蒸汽")
            .attribute(builder -> builder.viscosity(100).temperature(100).color(rgb(255, 250, 250, 125)))
            .useWaterTexture()
            .build();

    private static int rgb(int r, int g, int b, int a) {
        return Color.ofRGBA(r, g, b, a).getColor();
    }

    private static int rgb(int r, int g, int b) {
        return Color.ofRGBA(r, g, b, 255).getColor();
    }

    public static void initialize() {

    }
}
